package com.yangleping.springframework.test.bean;

import java.util.Random;

public class UserService3 implements IUserService{

    private String token;

    public UserService3() {
    }

    public UserService3(String token) {
        this.token = token;
    }
    @Override
    public String queryUserInfo() {
        try {
            Thread.sleep(new Random(1).nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "小傅哥，100001，深圳" + token;
    }

    @Override
    public String register(String userName) {
        try {
            Thread.sleep(new Random(1).nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "注册用户：" + userName + " success！" + token;
    }
}
